/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller.database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Shengyi_Chen
 */
public class InitialDatabase {
    
    private String JDBCDriver = "org.apache.derby.jdbc.EmbeddedDriver";
    
    public InitialDatabase()
    {
        Properties props = new Properties();
        props.put("user", "varoot");
        props.put("password", "admin");
        
        try {
            Class.forName(JDBCDriver).newInstance();
        } catch (ClassNotFoundException ex) {
           System.out.println("ClassNotFoundError: " + ex);
        } catch (InstantiationException ex){
           System.out.println("InstantiationException: " + ex);
        } catch (IllegalAccessException ex) {
            System.out.println("IllegalAccessException: " + ex);
        }
        
        try {
            Connection sqlConnect = DriverManager.getConnection("jdbc:derby://localhost:1527/va-big-data;create=true", "varoot", "admin");
            Statement stmt = sqlConnect.createStatement();
            
            //sqlConnect.
        }
        catch (SQLException e){
        }
}
}
